saveUser

  • function
 

If the user is being created, creates a new user and when successful:

viewmodel.saveUser(ev)

If the user is being created, creates a new user and when successful:

Parameters

  1. ev {*}

Returns

{Promise}

A promise that allows the component to display errors, if any.

- Creates a new session
- Logs the new user in
- Changes the page route from "register" to "account"

If the user's password is being updated, updates the password and when successful, clears the form.